/*
* License:  This  program  is  free  software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as published by
* the  Free Software Foundation; either version 3 of the License, or (at your
* option)  any later version. This program is distributed in the hope that it
* will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
* Public License for more details.
*/

package pcgen.CharacterViewer.fragments;

import android.app.DialogFragment;

import pcgen.CharacterViewer.resources.GameFolder;
import pcgen.CharacterViewer.resources.GameResourceCharacter;

public abstract class CharacterTabContentDialogFragment extends DialogFragment 
{
	public abstract boolean doDialogNegativeClick();
	
	public abstract boolean doDialogPositiveClick();
	
	protected static void initFragment(DialogFragment dialog, CharacterTabContentFragment fragment) 
    {
        dialog.setTargetFragment(fragment, 0);
        dialog.show(fragment.getFragmentManager(), "dialog");
    }
    
    protected CharacterTabContentFragment getTargetFragmentEx()
    {
    	return (CharacterTabContentFragment)getTargetFragment();
    }
    
    protected GameFolder getGame()
    {
    	return getTargetFragmentEx().getGame();
    }
    
    protected GameResourceCharacter getCharacter()
    {
    	return getTargetFragmentEx().getCharacterResource();
    }

	private static final String TAG = CharacterTabContentDialogFragment.class.getSimpleName();
}
